package com.ms.orm.util.idgenerator;

/**
 * id生成 器
 * @author zdh
 */
public interface IdentifierGenerator {

    /**
     * 生成Id
     * @param entity 实体
     * @return id
     */
    Number nextId(Object entity);

    /**
     * 生成uuid
     * @param entity 实体
     * @return uuid
     */
    default String nextUUID(Object entity) throws InstantiationException {
         throw new InstantiationException("UUID generator need to be instantiated");
    }
}
